package com.github.ghsea.sso.client.common;

import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.Protocol;


/**
 * @author guhai
 */
public class SsoJedisPool extends JedisPool {

    /**
     * 兼容redis密码为空的情况
     */
    public SsoJedisPool(final GenericObjectPoolConfig poolConfig, final String host, int port, int timeout, final String password) {
        super(poolConfig, host, port, timeout,
                StringUtils.isBlank(password) ? null : password,
                Protocol.DEFAULT_DATABASE, null);
    }

}
